<?php
namespace ITSociaal\Themes\Lumber;

/**
 * Wraps the new operator
 *
 * Because operator invocations can't be tested with PHPUnit
 */
trait CreateObjectTrait {

	/**
	 * Invokes the new operator for you :)
	 *
	 * @param string $class
	 * @param string ...$args
	 *
	 * @return object
	 */
	protected function createObject($class, ...$args) {
		return new $class(...$args);
	}

}

/* vi:set ts=4 sw=4 noet: */
